Repository navigation
Repository sync restores trashed files whose content has not changed - #1499
Merged
WaylandYang merged 2 commits intoNov 16, 2026
Merged
Conversation
Signed-off-by: Maya Kid <BinjunYann@gmail.com>
WaylandYang
approved these changes
Nov 16, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thanks — the unchanged-file shortcut no longer skips files trashed locally, for both connectors. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Repository sync should restore a locally trashed document when its file still exists upstream, as specified in #268. GitHub and GitLab both skipped the file when its upstream blob matched the local copy, so a sync could succeed while leaving the document in the trash indefinitely.
What changes
Only live documents can take the unchanged-file fast path. A trashed document goes through the existing ingest path, which restores the document and repairs its search and derived state. The two HTTP-fixture regressions verify the same document UUID, identical stored bytes, the same version count, and no additional fetches for other unchanged documents in the recovery round.
How it was checked
With Rust 1.98.1 and PostgreSQL 16.15 on Linux, both connector regressions failed on
dev(f33f9fc9) and passed on00d060a8.cargo fmt --all --checkpassed.cargo clippy --workspace --all-targets -- -D warningspassed on Linux.cargo test --workspacepassed on Linux with PostgreSQL and Poppler required. 1,848 passed and 6 were ignored.Before review
git commit -s).